# surfparc_mass_images_20070917.bash
# mass images

subjectsdir=/mri_projects/ASD_Analysis/Scripts/fc_verify
scriptdir=/mri_projects/ASD_Analysis/Scripts/fc_verify
templatedir=/mri_projects/ASD_Analysis/Parcellation_template

function onehemi() {
  sbjid=$1
  hemi=$2

  tksurfer fsaverage4 $hemi pial -overlay $subjectsdir"/fc_results/"$hemi"_fs4_"$sbjid".mgh" -tcl $scriptdir"/surfparc_makeimages.tcl" -fminmax 0.1 0.5
}

function onesubject() {
  sbjid=$1

  echo "========================================"
  echo "            "$sbjid
  echo "========================================"

  onehemi $sbjid lh
  onehemi $sbjid rh

  desdir=$screencapdir"/"$sbjid
  mkdir $desdir

  mv $screencapdir"/"*".tif" $desdir
}

function onetemplate() {
    sbjid=$1
    hemi=$2

    tksurfer fsaverage4 $hemi pial -overlay $templatedir"/"$hemi"_network_"$sbjid"_asym_fs4.mgh" -tcl $scriptdir"/surfparc_makeimages.tcl" -fminmax 0.1 0.8
}

screencapdir=$subjectsdir"/screencaps"
mkdir $screencapdir

# template
onetemplate 19 lh
onetemplate 19 rh

tempdesdir=$screencapdir"/"$sbjid"_temp"
mkdir $tempdesdir
mv $screencapdir"/"*".tif" $tempdesdir

# ASD
# onesubject GU2_28809
# onesubject GU2_28796
# onesubject GU2_28820
# onesubject GU2_28843
# onesubject GU2_28761
# onesubject GU2_28778
# onesubject GU2_28791
# onesubject GU2_28768
# onesubject GU2_28822
# onesubject GU2_28808
# onesubject GU2_28754
# onesubject GU2_28815

# HC
onesubject GU2_28793
onesubject GU2_28767
onesubject GU2_28804
onesubject GU2_28837
onesubject GU2_28766
onesubject GU2_28847
onesubject GU2_28845
onesubject GU2_28746
onesubject GU2_28828
onesubject GU2_28792
onesubject GU2_28744
onesubject GU2_28798
onesubject GU2_28806
